package com.zb.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zb.entity.SelectEmpVo;
import com.zb.entity.ZjWorkClientStrategyEmp;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * 工单客服分派策略人员表 Mapper 接口
 * </p>
 *
 * @author WEN
 * @since 2023-09-27
 */
@Repository
public interface ZjWorkClientStrategyEmpMapper extends BaseMapper<ZjWorkClientStrategyEmp> {

    /**
     * 根据分配客服ID删除所有
     * @param workClientStrategyId
     * @return
     */
    int deleteByWorkClientStrategyId(@Param("workClientStrategyId") Long workClientStrategyId);

    /**
     * 根据ID查询客服
     * @param workClientStrategyIds 工单客服分派策略表ID
     * @return
     */
    List<SelectEmpVo> getServiceEmpByWorkClientStrategyIds(@Param("workClientStrategyIds") List<Long> workClientStrategyIds);

    /**
     * 根据ID查询客服组
     * @param workClientStrategyIds 工单客服分派策略表ID
     * @return
     */
    List<SelectEmpVo> getServiceGroupByWorkClientStrategyIds(@Param("workClientStrategyIds") List<Long> workClientStrategyIds);

    /**
     * 根据客服组ID获取关联的客服组ID
     * @param custAccId 商家ID
     * @param workTeamIds 客服组ID
     * @return
     */
    List<Long> getWorkTeamIdByWorkTeamIds(@Param("custAccId") Long custAccId, @Param("workTeamIds") List<Long> workTeamIds);

}
